Autogenerated HTML docs for v1.5.3.7-1141-g4eb3
diff --git a/config.txt b/config.txt index 736fcd7..fabe7f8 100644 --- a/config.txt +++ b/config.txt
@@ -295,6 +295,20 @@ The command that git will use to paginate output. Can be overridden with the `GIT_PAGER` environment variable. +core.whitespace:: + A comma separated list of common whitespace problems to + notice. `git diff` will use `color.diff.whitespace` to + highlight them, and `git apply --whitespace=error` will + consider them as errors: ++ +* `trailing-space` treats trailing whitespaces at the end of the line + as an error (enabled by default). +* `space-before-tab` treats a space character that appears immediately + before a tab character in the initial indent part of the line as an + error (enabled by default). +* `indent-with-non-tab` treats a line that is indented with 8 or more + space characters that can be replaced with tab characters. + alias.*:: Command aliases for the gitlink:git[1] command wrapper - e.g. after defining "alias.last = cat-file commit HEAD", the invocation @@ -387,8 +401,8 @@ which part of the patch to use the specified color, and is one of `plain` (context text), `meta` (metainformation), `frag` (hunk header), `old` (removed lines), `new` (added lines), - `commit` (commit headers), or `whitespace` (highlighting dubious - whitespace). The values of these variables may be specified as + `commit` (commit headers), or `whitespace` (highlighting + whitespace errors). The values of these variables may be specified as in color.branch.<slot>. color.interactive:: @@ -762,6 +776,12 @@ The default set of branches for gitlink:git-show-branch[1]. See gitlink:git-show-branch[1]. +status.relativePaths:: + By default, gitlink:git-status[1] shows paths relative to the + current directory. Setting this variable to `false` shows paths + relative to the repository root (this was the default for git + prior to v1.5.4). + tar.umask:: This variable can be used to restrict the permission bits of tar archive entries. The default is 0002, which turns off the
diff --git a/git-apply.html b/git-apply.html index ab60b25..5bea985 100644 --- a/git-apply.html +++ b/git-apply.html
@@ -277,7 +277,7 @@ [--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] - [--whitespace=<nowarn|warn|error|error-all|strip>] + [--whitespace=<nowarn|warn|fix|error|error-all>] [--exclude=PATH] [--verbose] [<patch>…]</div></div> </div> <h2>DESCRIPTION</h2> @@ -489,20 +489,23 @@ </p> </dd> <dt> ---whitespace=<option> +--whitespace=<action> </dt> <dd> <p> - When applying a patch, detect a new or modified line - that ends with trailing whitespaces (this includes a - line that solely consists of whitespaces). By default, - the command outputs warning messages and applies the - patch. - When <a href="git-apply.html">git-apply(1)</a> is used for statistics and not applying a - patch, it defaults to <tt>nowarn</tt>. - You can use different <tt><option></tt> to control this - behavior: + When applying a patch, detect a new or modified line that has + whitespace errors. What are considered whitespace errors is + controlled by <tt>core.whitespace</tt> configuration. By default, + trailing whitespaces (including lines that solely consist of + whitespaces) and a space character that is immediately followed + by a tab character inside the initial indent of the line are + considered whitespace errors. </p> +<p>By default, the command outputs warning messages but applies the patch. +When <a href="git-apply.html">git-apply(1)</a> is used for statistics and not applying a +patch, it defaults to <tt>nowarn</tt>.</p> +<p>You can use different <tt><action></tt> to control this +behavior:</p> <ul> <li> <p> @@ -512,7 +515,15 @@ <li> <p> <tt>warn</tt> outputs warnings for a few such errors, but applies the - patch (default). + patch as-is (default). +</p> +</li> +<li> +<p> +<tt>fix</tt> outputs warnings for a few such errors, and applies the + patch after fixing them (<tt>strip</tt> is a synonym --- the tool + used to consider only trailing whitespaces as errors, and the + fix involved <em>stripping</em> them, but modern gits do more). </p> </li> <li> @@ -526,12 +537,6 @@ <tt>error-all</tt> is similar to <tt>error</tt> but shows all errors. </p> </li> -<li> -<p> -<tt>strip</tt> outputs warnings for a few such errors, strips out the - trailing whitespaces and applies the patch. -</p> -</li> </ul> </dd> <dt> @@ -599,7 +604,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 14-Nov-2007 12:11:20 UTC +Last updated 09-Dec-2007 10:19:06 UTC </div> </div> </body>
diff --git a/git-apply.txt b/git-apply.txt index c1c54bf..bae3e7b 100644 --- a/git-apply.txt +++ b/git-apply.txt
@@ -13,7 +13,7 @@ [--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] - [--whitespace=<nowarn|warn|error|error-all|strip>] + [--whitespace=<nowarn|warn|fix|error|error-all>] [--exclude=PATH] [--verbose] [<patch>...] DESCRIPTION @@ -135,25 +135,32 @@ be useful when importing patchsets, where you want to exclude certain files or directories. ---whitespace=<option>:: - When applying a patch, detect a new or modified line - that ends with trailing whitespaces (this includes a - line that solely consists of whitespaces). By default, - the command outputs warning messages and applies the - patch. - When gitlink:git-apply[1] is used for statistics and not applying a - patch, it defaults to `nowarn`. - You can use different `<option>` to control this - behavior: +--whitespace=<action>:: + When applying a patch, detect a new or modified line that has + whitespace errors. What are considered whitespace errors is + controlled by `core.whitespace` configuration. By default, + trailing whitespaces (including lines that solely consist of + whitespaces) and a space character that is immediately followed + by a tab character inside the initial indent of the line are + considered whitespace errors. ++ +By default, the command outputs warning messages but applies the patch. +When gitlink:git-apply[1] is used for statistics and not applying a +patch, it defaults to `nowarn`. ++ +You can use different `<action>` to control this +behavior: + * `nowarn` turns off the trailing whitespace warning. * `warn` outputs warnings for a few such errors, but applies the - patch (default). + patch as-is (default). +* `fix` outputs warnings for a few such errors, and applies the + patch after fixing them (`strip` is a synonym --- the tool + used to consider only trailing whitespaces as errors, and the + fix involved 'stripping' them, but modern gits do more). * `error` outputs warnings for a few such errors, and refuses to apply the patch. * `error-all` is similar to `error` but shows all errors. -* `strip` outputs warnings for a few such errors, strips out the - trailing whitespaces and applies the patch. --inaccurate-eof:: Under certain circumstances, some versions of diff do not correctly
diff --git a/git-bisect.html b/git-bisect.html index 3bbb493..cc4baf7 100644 --- a/git-bisect.html +++ b/git-bisect.html
@@ -341,7 +341,15 @@ <div class="content"> <pre><tt>$ git bisect visualize</tt></pre> </div></div> -<p>to see the currently remaining suspects in <tt>gitk</tt>.</p> +<p>to see the currently remaining suspects in <tt>gitk</tt>. <tt>visualize</tt> is a bit +too long to type and <tt>view</tt> is provided as a synonym.</p> +<p>If <tt>DISPLAY</tt> environment variable is not set, <tt>git log</tt> is used +instead. You can even give command line options such as <tt>-p</tt> and +<tt>--stat</tt>.</p> +<div class="listingblock"> +<div class="content"> +<pre><tt>$ git bisect view --stat</tt></pre> +</div></div> <h3>Bisect log and bisect replay</h3> <p>The good/bad input is logged, and</p> <div class="listingblock"> @@ -445,7 +453,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 14-Nov-2007 12:11:21 UTC +Last updated 09-Dec-2007 10:19:06 UTC </div> </div> </body>
diff --git a/git-bisect.txt b/git-bisect.txt index 4795349..8b9d61a 100644 --- a/git-bisect.txt +++ b/git-bisect.txt
@@ -92,7 +92,16 @@ $ git bisect visualize ------------ -to see the currently remaining suspects in `gitk`. +to see the currently remaining suspects in `gitk`. `visualize` is a bit +too long to type and `view` is provided as a synonym. + +If `DISPLAY` environment variable is not set, `git log` is used +instead. You can even give command line options such as `-p` and +`--stat`. + +------------ +$ git bisect view --stat +------------ Bisect log and bisect replay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/git-commit.html b/git-commit.html index 6074292..927a775 100644 --- a/git-commit.html +++ b/git-commit.html
@@ -404,7 +404,7 @@ </dt> <dd> <p> - This option bypasses the pre-commit hook. + This option bypasses the pre-commit and commit-msg hooks. See also <a href="hooks.html">hooks</a>. </p> </dd> @@ -715,7 +715,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 04-Dec-2007 08:28:18 UTC +Last updated 09-Dec-2007 10:19:07 UTC </div> </div> </body>
diff --git a/git-commit.txt b/git-commit.txt index 4bb2791..4261384 100644 --- a/git-commit.txt +++ b/git-commit.txt
@@ -86,7 +86,7 @@ Add Signed-off-by line at the end of the commit message. --no-verify:: - This option bypasses the pre-commit hook. + This option bypasses the pre-commit and commit-msg hooks. See also link:hooks.html[hooks]. --allow-empty::
diff --git a/git-config.html b/git-config.html index 65a7dbd..c34076c 100644 --- a/git-config.html +++ b/git-config.html
@@ -1085,6 +1085,38 @@ </p> </dd> <dt> +core.whitespace +</dt> +<dd> +<p> + A comma separated list of common whitespace problems to + notice. <tt>git diff</tt> will use <tt>color.diff.whitespace</tt> to + highlight them, and <tt>git apply --whitespace=error</tt> will + consider them as errors: +</p> +<ul> +<li> +<p> +<tt>trailing-space</tt> treats trailing whitespaces at the end of the line + as an error (enabled by default). +</p> +</li> +<li> +<p> +<tt>space-before-tab</tt> treats a space character that appears immediately + before a tab character in the initial indent part of the line as an + error (enabled by default). +</p> +</li> +<li> +<p> +<tt>indent-with-non-tab</tt> treats a line that is indented with 8 or more + space characters that can be replaced with tab characters. +</p> +</li> +</ul> +</dd> +<dt> alias.* </dt> <dd> @@ -1233,8 +1265,8 @@ which part of the patch to use the specified color, and is one of <tt>plain</tt> (context text), <tt>meta</tt> (metainformation), <tt>frag</tt> (hunk header), <tt>old</tt> (removed lines), <tt>new</tt> (added lines), - <tt>commit</tt> (commit headers), or <tt>whitespace</tt> (highlighting dubious - whitespace). The values of these variables may be specified as + <tt>commit</tt> (commit headers), or <tt>whitespace</tt> (highlighting + whitespace errors). The values of these variables may be specified as in color.branch.<slot>. </p> </dd> @@ -1951,6 +1983,17 @@ </p> </dd> <dt> +status.relativePaths +</dt> +<dd> +<p> + By default, <a href="git-status.html">git-status(1)</a> shows paths relative to the + current directory. Setting this variable to <tt>false</tt> shows paths + relative to the repository root (this was the default for git + prior to v1.5.4). +</p> +</dd> +<dt> tar.umask </dt> <dd> @@ -2062,7 +2105,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 07-Dec-2007 09:49:13 UTC +Last updated 09-Dec-2007 10:19:07 UTC </div> </div> </body>
diff --git a/git-status.html b/git-status.html index fa89d1c..870a6d9 100644 --- a/git-status.html +++ b/git-status.html
@@ -276,18 +276,19 @@ </div> <h2>DESCRIPTION</h2> <div class="sectionbody"> -<p>Examines paths in the working tree that has changes unrecorded -to the index file, and changes between the index file and the -current HEAD commit. The former paths are what you _could_ -commit by running <em>git add</em> before running <em>git -commit</em>, and the latter paths are what you _would_ commit by -running <em>git commit</em>.</p> -<p>If there is no path that is different between the index file and -the current HEAD commit, the command exits with non-zero -status.</p> +<p>Displays paths that have differences between the index file and the +current HEAD commit, paths that have differences between the working +tree and the index file, and paths in the working tree that are not +tracked by git (and are not ignored by <a href="gitignore.html">gitignore(5)</a>). The first +are what you _would_ commit by running <tt>git commit</tt>; the second and +third are what you _could_ commit by running <tt>git add</tt> before running +<tt>git commit</tt>.</p> <p>The command takes the same set of options as <tt>git-commit</tt>; it shows what would be committed if the same options are given to <tt>git-commit</tt>.</p> +<p>If there is no path that is different between the index file and +the current HEAD commit (i.e., there is nothing to commit by running +<tt>git-commit</tt>), the command exits with non-zero status.</p> <p>If any paths have been touched in the working tree (that is, their modification times have changed) but their contents and permissions are identical to those in the index file, the command @@ -298,10 +299,11 @@ <h2>OUTPUT</h2> <div class="sectionbody"> <p>The output from this command is designed to be used as a commit -template comments, and all the output lines are prefixed with <em>#</em>.</p> +template comment, and all the output lines are prefixed with <em>#</em>.</p> <p>The paths mentioned in the output, unlike many other git commands, are -made relative to the current directory, if you are working in a -subdirectory (this is on purpose, to help cutting and pasting).</p> +made relative to the current directory if you are working in a +subdirectory (this is on purpose, to help cutting and pasting). See +the status.relativePaths config option below.</p> </div> <h2>CONFIGURATION</h2> <div class="sectionbody"> @@ -309,6 +311,9 @@ mean the same thing and the latter is kept for backward compatibility) and <tt>color.status.<slot></tt> configuration variables to colorize its output.</p> +<p>If the config variable <tt>status.relativePaths</tt> is set to false, then all +paths shown are relative to the repository root, not to the current +directory.</p> </div> <h2>See Also</h2> <div class="sectionbody"> @@ -329,7 +334,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 07-Dec-2007 09:49:19 UTC +Last updated 09-Dec-2007 10:19:07 UTC </div> </div> </body>
diff --git a/git-status.txt b/git-status.txt index b0cb6bc..a1bb9bd 100644 --- a/git-status.txt +++ b/git-status.txt
@@ -12,21 +12,22 @@ DESCRIPTION ----------- -Examines paths in the working tree that has changes unrecorded -to the index file, and changes between the index file and the -current HEAD commit. The former paths are what you _could_ -commit by running 'git add' before running 'git -commit', and the latter paths are what you _would_ commit by -running 'git commit'. - -If there is no path that is different between the index file and -the current HEAD commit, the command exits with non-zero -status. +Displays paths that have differences between the index file and the +current HEAD commit, paths that have differences between the working +tree and the index file, and paths in the working tree that are not +tracked by git (and are not ignored by gitlink:gitignore[5]). The first +are what you _would_ commit by running `git commit`; the second and +third are what you _could_ commit by running `git add` before running +`git commit`. The command takes the same set of options as `git-commit`; it shows what would be committed if the same options are given to `git-commit`. +If there is no path that is different between the index file and +the current HEAD commit (i.e., there is nothing to commit by running +`git-commit`), the command exits with non-zero status. + If any paths have been touched in the working tree (that is, their modification times have changed) but their contents and permissions are identical to those in the index file, the command @@ -38,11 +39,12 @@ OUTPUT ------ The output from this command is designed to be used as a commit -template comments, and all the output lines are prefixed with '#'. +template comment, and all the output lines are prefixed with '#'. The paths mentioned in the output, unlike many other git commands, are -made relative to the current directory, if you are working in a -subdirectory (this is on purpose, to help cutting and pasting). +made relative to the current directory if you are working in a +subdirectory (this is on purpose, to help cutting and pasting). See +the status.relativePaths config option below. CONFIGURATION @@ -53,6 +55,10 @@ compatibility) and `color.status.<slot>` configuration variables to colorize its output. +If the config variable `status.relativePaths` is set to false, then all +paths shown are relative to the repository root, not to the current +directory. + See Also -------- gitlink:gitignore[5]
diff --git a/gitattributes.html b/gitattributes.html index c5061f0..488ddc3 100644 --- a/gitattributes.html +++ b/gitattributes.html
@@ -629,6 +629,49 @@ merge between common ancestors, when there are more than one. When left unspecified, the driver itself is used for both internal merge and the final merge.</p> +<h3>Checking whitespace errors</h3> +<h4><tt>whitespace</tt></h4> +<p>The <tt>core.whitespace</tt> configuration variable allows you to define what +<tt>diff</tt> and <tt>apply</tt> should consider whitespace errors for all paths in +the project (See <a href="git-config.html">git-config(1)</a>). This attribute gives you finer +control per path.</p> +<dl> +<dt> +Set +</dt> +<dd> +<p> + Notice all types of potential whitespace errors known to git. +</p> +</dd> +<dt> +Unset +</dt> +<dd> +<p> + Do not notice anything as error. +</p> +</dd> +<dt> +Unspecified +</dt> +<dd> +<p> + Use the value of <tt>core.whitespace</tt> configuration variable to + decide what to notice as error. +</p> +</dd> +<dt> +String +</dt> +<dd> +<p> + Specify a comma separate list of common whitespace problems to + notice in the same format as <tt>core.whitespace</tt> configuration + variable. +</p> +</dd> +</dl> </div> <h2>EXAMPLE</h2> <div class="sectionbody"> @@ -703,7 +746,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 14-Nov-2007 12:11:57 UTC +Last updated 09-Dec-2007 10:19:08 UTC </div> </div> </body>
diff --git a/gitattributes.txt b/gitattributes.txt index 19bd25f..71c7ad7 100644 --- a/gitattributes.txt +++ b/gitattributes.txt
@@ -361,6 +361,37 @@ internal merge and the final merge. +Checking whitespace errors +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`whitespace` +^^^^^^^^^^^^ + +The `core.whitespace` configuration variable allows you to define what +`diff` and `apply` should consider whitespace errors for all paths in +the project (See gitlink:git-config[1]). This attribute gives you finer +control per path. + +Set:: + + Notice all types of potential whitespace errors known to git. + +Unset:: + + Do not notice anything as error. + +Unspecified:: + + Use the value of `core.whitespace` configuration variable to + decide what to notice as error. + +String:: + + Specify a comma separate list of common whitespace problems to + notice in the same format as `core.whitespace` configuration + variable. + + EXAMPLE -------